package org.zephy.time;

/**
 * 常规用法
 */
public class TimeMain {
    public static void main(String[] args) {
        Long startTime=System.currentTimeMillis();
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        Long endTime=System.currentTimeMillis();

        Long elapsedTime=(endTime-startTime);
        System.out.println("这段时间共耗时:"+elapsedTime);
    }
}
